﻿
using Mono.Cecil;

namespace il2lua.TypeSystem;

public class ILAssembly
{
    public IModule MainModule { get; }
    public ILAssembly(string fieldName)
    {
        var assembly = AssemblyDefinition.ReadAssembly(fieldName);
        var mainModule = assembly.MainModule;
        mainModule.ReadSymbols();
        var symbol = mainModule.SymbolReader;
        MainModule = new ILModule(mainModule, symbol);
        //MainModule.SimplifyMacros();
    }
}
